package com.linkgie.galaxyframework.security.ca;

import com.linkgie.galaxyframework.crypto.Crypto;
import com.linkgie.galaxyframework.crypto.Signature;
import com.linkgie.galaxyframework.utils.StringConverter;

public class SignatureConverter implements StringConverter<Signature>{

    @Override
    public String encode(Signature value) {
        return value.getEncodedString();
    }

    @Override
    public Signature decode(String stringValue) {
        return Crypto.decode(stringValue, Signature.class);
    }
   
}
